import request from '@/utils/request'

export function insertUser(params) {
  return request({
    url: '/user/insertUser',
    method: 'post',
    data: params
  })
}

export function updateUser(params) {
  return request({
    url: '/user/updateUser',
    method: 'post',
    data: params
  })
}

export function deleteUser(id) {
  return request({
    url: '/user/deleteUser',
    method: 'post',
    params: { id: id }
  })
}

export function selectUserByLimit(pageNum, pageSize, name) {
  return request({
    url: '/user/selectUserByLimit',
    method: 'get',
    params: {
      pageNum: pageNum,
      pageSize: pageSize,
      name: name
    }
  })
}
